unit FRM_BROWSEFUNCIONARIOS;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, FRM_PADRAOTELAS, StdCtrls, Mask, SkinBoxCtrls, SkinCtrls, SkinGrids,
  spDBGrids, DB;

type
  TForm7 = class(TForm6)
    DataSource1: TDataSource;
    procedure lbl_buscaChange(Sender: TObject);
    procedure btn_incluirClick(Sender: TObject);
    procedure btn_excluirClick(Sender: TObject);
    procedure btn_AlterarClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form7: TForm7;

implementation

uses FRM_UPDATEFUNCIONARIOS;

{$R *.dfm}

procedure TForm7.btn_AlterarClick(Sender: TObject);
begin
  inherited;
  form8.OI:= 'a';
form8.show;
end;

procedure TForm7.btn_excluirClick(Sender: TObject);
begin
  inherited;
  try
    DataSource1.DataSet.Delete;
  finally
    ShowMessage('nao foi possivel!');
  end;
  //
end;

procedure TForm7.btn_incluirClick(Sender: TObject);
begin
  inherited;
  form8.OI:= 'i';
form8.show;
end;

procedure TForm7.lbl_buscaChange(Sender: TObject);
begin
inherited;
if lbl_busca.Text <> '' then
BEGIN
DataSource1.DataSet.Filtered := False;
DataSource1.DataSet.Filter := ' upper (FUNNOME) LIKE ''%'+ UpperCase(lbl_busca.Text)+'%'' ';
DataSource1.DataSet.Filtered := true;
END
else
DataSource1.DataSet.Filtered := false;
end;

end.
